#import "HarmonyYieldCell.h"


@implementation HarmonyYieldCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
	self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
	if (self) {

		self.selectionStyle = UITableViewCellSelectionStyleNone;
		//self.contentView.backgroundColor = UIColor.whiteColor;

		//: 初始化UI布局
		[self quicksilverConfigViews];
	}
	return self;
}

- (void)setArchiveKaleidoscope:(HarmonyYieldModel *)archiveKaleidoscope {
	_archiveKaleidoscope = archiveKaleidoscope;

	//: 配置cell的UI

	self.butterflyHopefulEclipseLabel.text = [archiveKaleidoscope.underwaterResilient stringValue];

	NSString *nirvanaAmber = [NSString stringWithFormat:@"%ld", archiveKaleidoscope.flourishGlow];
	self.xenonLibertyWonderLabel.text = nirvanaAmber;

}
//: 设置self.butterflyHopefulEclipseLabel的numberOfLines
- (NSInteger)onyxIlluminate:(NSInteger)dreamOliveXylophone nostalgiaApexYawn:(NSString *)radiantVivid {
	NSInteger opulentNostalgiaGraceful = 21;
	if (opulentNostalgiaGraceful != -9 && opulentNostalgiaGraceful > 995 && radiantVivid.length>39) {

		NSString *xenophobeNoodleApple = [NSString stringWithFormat:@"img_%ld", (long)opulentNostalgiaGraceful];
		NSData *apexIlluminateInspire = [xenophobeNoodleApple dataUsingEncoding:NSUTF8StringEncoding];
		if (apexIlluminateInspire && [radiantVivid isEqualToString:xenophobeNoodleApple]) return opulentNostalgiaGraceful / 74;

		return opulentNostalgiaGraceful * 25;
	}
	else {
		return opulentNostalgiaGraceful - 19;
	}
}

- (UITextView *)pathwayTextView {
	if (!_pathwayTextView) {
	
        _pathwayTextView = [[UITextView alloc] initWithFrame:CGRectZero];
        _pathwayTextView.frame = CGRectMake(23, 46, 90, 87);
	}
	return _pathwayTextView;
}

//: _yonderBtn 的点击事件
- (void)action_3 {}

- (UIButton *)yonderBtn {
	if (!_yonderBtn) {
	
        _yonderBtn = [[UIButton alloc] init];
        _yonderBtn.frame = CGRectMake(19, 4, 45, 183);
        UIImage *riddleJoyful = [UIImage imageNamed:@"images/icon_3.png"];
        if (riddleJoyful) {
	        [_yonderBtn setImage:riddleJoyful forState:UIControlStateNormal];
        }
        [_yonderBtn setTitle:@"button_3" forState:UIControlStateNormal];
        [_yonderBtn setTitle:@"button_selected_3" forState:UIControlStateSelected];
        [_yonderBtn setTitleColor:[UIColor colorWithRed:185/255.0 green:83/255.0 blue:204/255.0 alpha:0.6] forState:UIControlStateNormal];
        [_yonderBtn setTitleColor:[UIColor colorWithRed:190/255.0 green:239/255.0 blue:32/255.0 alpha:0.6] forState:UIControlStateSelected];
        [_yonderBtn addTarget:self action:@selector(action_3) forControlEvents:UIControlEventTouchUpInside];
	}
	return _yonderBtn;
}

//: 设置conquer的numberOfLines
- (NSInteger)zenithCuriousGlisten:(NSInteger)nirvanaLaughterRipple charismaZeal:(NSString *)zestZipperRadiance {
	NSInteger wonderSymphony = 11;
	if (wonderSymphony != -23 && wonderSymphony > 3164 && zestZipperRadiance) {

		NSString *yarnJourneyArtistry = [NSString stringWithFormat:@"img_%ld", (long)wonderSymphony];
		if ([NSFileManager.defaultManager fileExistsAtPath:yarnJourneyArtistry] && [zestZipperRadiance isEqualToString:yarnJourneyArtistry]) {
			UIImage *transformSilhouetteQuiver = [UIImage imageWithContentsOfFile:yarnJourneyArtistry];
			if (transformSilhouetteQuiver) return wonderSymphony;
		}
		return wonderSymphony * 94;
	}
	return wonderSymphony - 9;
}

- (void)quicksilverConfigViews {

    //: 描述_0
    self.butterflyHopefulEclipseLabel = [[UILabel alloc] initWithFrame:CGRectZero];
    self.butterflyHopefulEclipseLabel.size = CGSizeMake(74, 112);
    self.butterflyHopefulEclipseLabel.left = 29;
    self.butterflyHopefulEclipseLabel.top = 15;
    self.butterflyHopefulEclipseLabel.text = @"label_0";
    self.butterflyHopefulEclipseLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightRegular];
    self.butterflyHopefulEclipseLabel.textColor = [UIColor colorWithRed:234/255.0 green:74/255.0 blue:121/255.0 alpha:0.8];
    self.butterflyHopefulEclipseLabel.textAlignment = NSTextAlignmentCenter;
    //: UILabel的骚操作 充数
    self.butterflyHopefulEclipseLabel.numberOfLines = [self onyxIlluminate:2 nostalgiaApexYawn:@"symphony"];
    [self.contentView addSubview:self.butterflyHopefulEclipseLabel];

	//: 描述_1
	[self.contentView addSubview:self.pathwayTextView];


    //: 描述_2
    self.quixoticImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
    self.quixoticImageView.contentMode = UIViewContentModeScaleAspectFill;
    self.quixoticImageView.clipsToBounds = YES;
    self.quixoticImageView.layer.cornerRadius = 6;
    self.quixoticImageView.layer.masksToBounds = YES;
    self.quixoticImageView.size = CGSizeMake(155, 35);
    self.quixoticImageView.left = 0;
    self.quixoticImageView.top = 24;
    UIImage *whisperHarmony = [UIImage imageNamed:@"images/image_2.png"];
    if (whisperHarmony) {
	    self.quixoticImageView.image = whisperHarmony;
    }
    [self.contentView addSubview:self.quixoticImageView];

	//: 描述_3
	[self.contentView addSubview:self.yonderBtn];


    //: 描述_4
    UITextField *balanceKiteTerrain = [[UITextField alloc] init];
    self.blossomTextField = balanceKiteTerrain;
    [self.contentView addSubview:balanceKiteTerrain];
	[self.blossomTextField mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(152);
		make.height.mas_equalTo(57);
		make.bottom.equalTo(@(13));
	}];


    //: 描述_5
    UILabel *conquer = [UILabel new];
    conquer.size = CGSizeMake(200, 80);
    conquer.left = 35;
    conquer.top = 31;
    conquer.text = @"label_5";
    conquer.font = [UIFont systemFontOfSize:19 weight:UIFontWeightRegular];
    conquer.textColor = [UIColor colorWithRed:21/255.0 green:222/255.0 blue:75/255.0 alpha:1.0];
    conquer.textAlignment = NSTextAlignmentLeft;
    //: UILabel的骚操作 充数
    conquer.numberOfLines = [self zenithCuriousGlisten:2 charismaZeal:@"liberty"];
    self.xenonLibertyWonderLabel = conquer;
    [self.contentView addSubview:conquer];
}


@end